﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerDetail.aspx.cs"
    Inherits="ZLDC.Estate.CM.CustomerDetail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>客源详细信息</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../js/jquery.autocomplete/jquery.autocomplete.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server" onpaste="return false"  oncut="return false;">
    <div id="divHead">
        <asp:Button ID="btnFirst" runat="server" Text="首条" CssClass="button_bak2"></asp:Button><asp:Button
            ID="btnPrev" runat="server" Text="上一条" CssClass="button_bak2"></asp:Button><asp:Button
                ID="btnNext" runat="server" Text="下一条" CssClass="button_bak2"></asp:Button><asp:Button
                    ID="btnLast" runat="server" Text="尾条" CssClass="button_bak2"></asp:Button>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnChange" runat="server" CssClass="button_bak2" Text="转介客" OnClientClick="return changeTo()" />
        <asp:Button ID="btnInfo1" runat="server" CssClass="button_bak2" Text="转私客" OnClientClick="javascript:return change(0)" />
        <asp:Button ID="btnInfo2" runat="server" CssClass="button_bak2" Text="转公客" OnClientClick="javascript:return change(1)" />
        <asp:Button ID="btnDelete" runat="server" CssClass="button_bak2" Text="删除" OnClientClick="return del()" />
        <asp:Button ID="btnToDatum" runat="server" Visible="false" CssClass="button_bak2"
            Text="转资料" OnClientClick="javascript:return CustomerToDatum(this);" OnClick="btnToDatum_Click" />
        <asp:Button ID="btnToDeal" runat="server" Visible="false" CssClass="button_bak2"
            Text="转成交" OnClientClick="javascript:return CustomerToDeal(this);" OnClick="btnToDeal_Click" />
    </div>
    <div id="divSearch" style="margin-top: 3px; text-align: center;">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    客户名:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sCustomer"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    客户电话:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sCustomerTel"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    户型:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sRoom"></span>
                </td>
            </tr>
            <tr>
                <td width="6%" align="right" bgcolor="#F7F7F7">
                    交易类型:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sTradetype"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    面积:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAcreage"></span>m2
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    价格:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sPrice"></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    所属人:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sOwner"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    所属人部门:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sOwnerDept"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    所属人电话:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sOwnerTel"></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    所属时间:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sOwnerDate"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    状态:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <font color="red"><span id="sStatus"></span></font>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                   
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    备注:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sRemark"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    转介备注:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="mark3"></span>
                </td>
                <td  width="10%" align="right" bgcolor="#F7F7F7" >
                    看房次数：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="mark2"></span>
                </td>
            </tr>
        </table>        
    </div>
    【温馨提示：<a href="javascript:iAdvancedSearch_onclick()" id="openAdvancedSearch"><b>请点击查看更多详细信息</b></a>】<span
        id="sOutmsg"></span>
    <br />
    <div id="divAdvancedSearch" style="margin-top: 3px; text-align: center; display: none;">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    客源编号:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sCustomerID"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    用途:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sUsage"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    职业:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sOccupation"></span>
                </td>
            </tr>
            
            <tr>
                
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    代理人:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAgent"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    代理人电话:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAgentTel"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                   
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                   
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    意向城区:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sDname"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    意向片区:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sArea"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    付佣:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sPayType"></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    朝向:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sDirect"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    客户类型:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <font color="red"><span id="sIsSelf"></span></font>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    楼层:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sFloor"></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    房屋类型:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sType"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    样式:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sHouseStyle"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    来源:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sInfoFrom"></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    <span id="Lbadduser" runat="server">录入人:</span>
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAddUser"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    <span id="Lbadduserdept" runat="server">录入人部门:</span>
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAddDept"></span>
                </td>
                 <td width="10%" align="right" bgcolor="#F7F7F7">
                 录入时间:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAddDate"></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    修改人:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sModifyUser"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    修改时间:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sModifyDate"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    装修:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sFitment"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    购买动机:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sBuyingMotive"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                   
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    等级:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sCustomerClass"></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    意向楼盘:
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;" colspan="5">
                    <span id="sEstates"></span>
                </td>
            </tr>
        </table>
    </div>
    <div class="f_l rqieh" id="div_tab">
        <a id="tag1" style="cursor: pointer; display: none;" onclick="go_to(1);">客户详情</a>
        <a id="tag2" style="cursor: pointer;" onclick="go_to(2);">跟进记录</a> <a id="tag3" style="cursor: pointer;"
            onclick="go_to(3);">房源匹配</a> <a id="tag4" style="cursor: pointer;" onclick="go_to(4);">
                提醒信息</a> <a id="tag5" style="cursor: pointer;" onclick="go_to(5);">转介记录</a>
        <a id="tag6" style="cursor: pointer; display: none;" onclick="go_to(6);">成交信息</a>
        <a id="tag7" style="cursor: pointer; " onclick="go_to(7);">同电话客</a>
    </div>
    <div id="div1" class="page f_l" style="display: none">
    </div>
    <div id="div2" class="page f_l" style="display: none" onselectstart="return false">
        <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
            <tr>
                <td bgcolor="#FFFFFF" style="width: 8%; height: 25px;">
                    等级：
                </td>
                <td bgcolor="#FFFFFF" style="width: 20%; height: 25px;">
                    <select id="customerClass" name="customerClass" runat="server">
                    </select>
                </td>
                <td bgcolor="#FFFFFF" style="width: 12%; height: 25px;">
                    跟进方式：
                </td>
                <td bgcolor="#FFFFFF" style="width: 20%; height: 25px;">
                    <select id="followType" runat="server" name="followType" style="width: 50%" onchange="followTypeChange()">
                    </select>
                </td>
                <td bgcolor="#FFFFFF" style="width: 16%; height: 25px;">
                    <input id="cbSeeEstate" type="checkbox" onclick="IsChecked()" />是否看房 所看房源：
                </td>
                <td bgcolor="#FFFFFF" style="width: 20%; height: 25px;">
                    <table style="width: 98%; height: 25px;">
                        <tr>
                            <td style="width: 60%; height: 25px;" align="right">
                                <input id="txtEstate" style="width: 98%" name="txtEstate" type="text" readonly />
                            </td>
                            <td align="left" style="width: 30%">
                                <a href="javascript:ShowDialogHList('HousingList.aspx')" id="selectHousing" style="display:none">请选择</a>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" style="width: 12%; height: 25px;">
                    跟进内容：
                </td>
                <td bgcolor="#FFFFFF" style="width: 32%; height: 25px;" colspan="5">
                    <textarea id="fcontent" name="fcontent" style="width: 98%; height: 26px;"></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="6" align="center" bgcolor="#F7F7F7" style="width: 70%">
                    <input id="btnSave" class="button_bak" type="button" value="提交" onclick="return submitOk()" />
                </td>
            </tr>
        </table>
        <%--  <a href="javascript:ShowDialog('CustomerFloow.aspx');"><font color='red'>添加跟进</font></a>--%>
        <div id="divfollow" onselectstart="return false">
        </div>
        <div id="divPage">
        </div>
    </div>
    <div id="div3" class="page f_l" style="display: none">
        <strong><font color='red'>可选房源匹配条件</font></strong>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
            <tr>
                <td width="20%" bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbDname" type="checkbox" checked disabled />城区：<font color="red"><span
                        id="div3_sDname"></span></font> 片区：<font color="red"><span id="div3_sArea"></span></font><!-- 城区片区 -->
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbUse" type="checkbox" checked disabled />用途：<font color="red"><span id="div3_sUse"></span></font>
                    <!-- 用途 -->
                </td>
                <td width="20%" bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbBuildName" type="checkbox" checked onclick="showHousing(1)" />意向楼盘：<font
                        color="red"><span id="div3_sBuildName"></span></font><!-- 楼盘名称 -->
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbTradetype" type="checkbox" checked onclick="showHousing(1)" />类型：<span
                        id="div3_sTradetype"></span><!-- 交易类型 -->
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbTotalPrice" type="checkbox" checked onclick="showHousing(1)" />价格：<span
                        id="div3_sMinTotalPrice"></span>~<span id="div3_sMaxTotalPrice"></span><span id="div3_unit"></span><!-- 租售价格 -->
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbAcreage" type="checkbox" checked onclick="showHousing(1)" />面积：<span
                        id="div3_sMinAcreage"></span>~<span id="div3_sMaxAcreage"></span>m2<!-- 面积 -->
                </td>
            </tr>
            <tr>
                <td width="20%" bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbRoomHall" type="checkbox" onclick="showHousing(1)" checked />户型：<span
                        id="div3_sRoomHall"></span>房<!-- 户型 -->
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbDirect" type="checkbox" checked onclick="showHousing(1)" />朝向：<span
                        id="div3_sDirect"></span><!-- 朝向 -->
                </td>
                <td width="20%" bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <input id="cbFitment" type="checkbox" checked onclick="showHousing(1)" />装修：<span
                        id="div3_sFitment"></span><!-- 朝向 -->
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                </td>
            </tr>
        </table>
        <div id="div3_list">
        </div>
        <!-- 匹配出的客源列表 -->
        <div id="div3_page">
        </div>
    </div>
    <div id="div4" class="page f_l" style="display: none">
        <a href="javascript:UpdateAlert();"><font color='red'>处理提醒</font></a> <a href="javascript:ShowDialog('CustomerInfo.aspx');">
            <font color='red'>添加提醒</font></a>
        <div id="divAlert">
        </div>
        <div id="divAlertPage">
        </div>
    </div>
    <div id="div5" class="page f_l" style="display: none">
        <div id="divChangeCustomer">
        </div>
        <div id="divChangeCustomerPage">
        </div>
    </div>
    <div id="div6" class="page f_l" style="display: none">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    成交部门：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;" colspan="3">
                    <span id='sPfyx'></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    成交时间：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id='sDdate'></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    成交类型：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id='sDtype'></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    购房目的：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id='sBuyuse'></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    付款情况：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id='sPaystate'></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    客源编号：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id='sKty_id'></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    客户姓名：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id='sKname'></span>
                </td>
            </tr>
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    成交物业：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;" colspan="7">
                    <span id='sMname'></span>
                </td>
            </tr>
        </table>
    </div>
    <div id="div7" class="page f_l" style="display: none">
         <img src="../images/loading.gif" />
    </div>
    <input id="hChangeStatus" name="hChangeStatus" runat="server" type="hidden" />
    <input id="hChangeUserId" name="hChangeUserId" runat="server" type="hidden" />
    <input id="ddept" name="ddept" runat="server" type="hidden" />
    <input id="ddeptid" name="ddeptid" runat="server" type="hidden" />
    <input id="duser" name="duser" runat="server" type="hidden" />
    <input id="duserid" name="duserid" runat="server" type="hidden" />
    <input id="customerId" name="customerId" type="hidden" />
    <input id="housingid" name="housingid" type="hidden" />
    <input id="IsSee" name="IsSee" type="hidden" />
    <input id="hID" name="hID" runat="server" type="hidden" />
    <input id="fid" name="fid" type="hidden" />
    <input id="hUserID" name="hUserID" runat="server" type="hidden" />
    <input id="hIsManager" name="hIsManager" runat="server" value="0" type="hidden" />
    <input id="hIsManager1" name="hIsManager1" runat="server" value="0" type="hidden" />
    <input id="hManagerChangIsSelf" runat="server" type="hidden" />
    <div id="dvToPty" style="overflow: auto; z-index: 9999; left: 200px; position: absolute;
        top: 25px; display: none; border: 2px; border-style: outset; background-color: #cccccc;
        height: 30px; width: 350px">
        <font color="red">接客人:</font><asp:TextBox ID="tbMakeUser" runat="server" Width="230px"></asp:TextBox>
        <asp:Button ID="btToPty" OnClientClick="return chkToPty();" runat="server" Text="确 定"
            OnClick="btToPty_Click" />
    </div>
    </form>

    <script src="../js/LexunJS.js" type="text/javascript"></script>

    <script src="js/CustomerDetailJS.min.js?v=20111207" type="text/javascript"></script>

    <script src="../js/jquery.autocomplete/jquery.autocomplete.min.js" type="text/javascript"></script>

</body>
</html>
